package com.jun.feign.service;

import com.jun.feign.entity.User;
import com.jun.feign.service.impl.HelloServiceFallback;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 描述:
 *
 * @outhor jun
 * @create 2018-04-27 11:08
 */
@FeignClient(value = "hello-service" , fallback = HelloServiceFallback.class)
public interface HelloService {
    @RequestMapping("/hello")
    String hello();

    @RequestMapping(value = "/hello1" , method = RequestMethod.GET)
     String hello(@RequestParam("name") String name);

    @RequestMapping(value = "/hello2" , method = RequestMethod.GET)
    User hello(@RequestHeader("name") String name , @RequestHeader("age") Integer age);

    @RequestMapping(value = "/hello3" , method = RequestMethod.POST)
     String hello(@RequestBody User user);
}
